<?php $this->load->view("general/header");?>
<div id="view_invoice" class="page_">
    <div class="form">              
        <div class="form_header"><a href="#">Lihat Daftar Mobil</a> </div>
        
            <select id="owner" name="ownerName" onchange="javascript:viewCar(
                                                        '#owner', '#content_datax', '0')" >
            <option value="X" selected="selected">Tampilkan Semua</option>
          	<option value="" disabled="disabled">---Agency/Penyewaan---</option>
			<?php foreach ($owner as $owner11){?>
            	
                <option value="<?php echo $owner11['owner_id'];?>">  <?php echo $owner11['owner_name'];?></option>
                
            <?php }?>
            <option value="" disabled="disabled">---Leasing Company---</option>
            <?php foreach ($ownerLsg as $ownerLsg11){?>
            	
                <option value="<?php echo $ownerLsg11['owner_id'];?>">  <?php echo $ownerLsg11['owner_name'];?></option>
                
            <?php }?>
            
            </select><br />

        
        <div class="content_data" id="content_datax">
        	<div id="selectplace" align="right">
                
                <input type="text" id="inputjenis" placeholder="Masukan Plat Mobil" onkeydown="if (event.keyCode == 13) document.getElementById('btnSearch').click()"/>/>
              <input type="button" name="btnSearch" id="btnSearch" value="Cari" class="button_red" onclick="javascript:carJenisBarang(
                                                           '#inputjenis', '#searchPlace', '0')"/>
            </div>
            <div id="searchPlace">
           <div id="pager1" class="pager1">
        		<table id="background-image"> 
                    <thead> 
                        <tr> 
                            <th>Produsen</th>
                            <th>Type</th>
                            <th>Model</th>
                            <th>Jenis Mobil</th>
                            <th>Daya</th>
                            <th>Nomor Plat</th> 
                            <th>Transmisi</th>
                            <th>Warna</th>
                            <th>Tarif/hari</th>
                            
                        </tr> 
                    </thead> 
                    <tbody> 
                        <?php foreach ($car as $car1){?>                        
                        <tr>
                        	<td><?php echo $car1['produsen'];?></td> 
                        	<td><?php echo $car1['type'];?></td> 
                        	<td><?php echo $car1['model'];?></td> 
                            <td><?php echo $car1['car_name'];?></td>
                        	<td><?php echo $car1['daya'];?> Orang</td> 
                            
                            <td><?php echo $car1['car_license'];?></td> 
                            <td><?php echo $car1['transmisi'];?></td>
                            <td width="13%"><?php echo $car1['warna'];?></td> 
                            <td><?php echo $car1['tarif'];?></td>
                            <td align="center" width="13%"><a href="<?php echo site_url('car/edit/' . $car1['car_id'])?>">Ubah</a> | <a href="<?php echo site_url('car/delete/'. $car1['car_id'])?>" onclick="return confirm('Apakah Anda ingin menghapus data <?php echo $car1['car_name'];?>?')">Hapus</a></td>                          
                        </tr> 
                        <?php } ?>
                       
                   </tbody> 
                    
				</table> 
                    <form>
                        <img src="<?php echo base_url();?>img/first.png" class="first" title="back to first"/>
                        <img src="<?php echo base_url();?>img/prev.png" class="prev" title="previous"/>
                        <input type="text" class="pagedisplay"/>
                        <img src="<?php echo base_url();?>img/next.png" class="next" title="next"/>
                        <img src="<?php echo base_url();?>img/last.png" class="last" title="go to last"/>
                       
                        <select class="pagesize">
                            <option selected="selected"  value="10">10</option>
                            <option value="15">15</option>
                            
                        </select>
                    
                    </form>
           </div>
        </div>
    </div>      
</div>

<?php $this->load->view("general/footer");?>